import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
import Home from "../views/Home.vue";

// @ts-ignore
const routes: Array<RouteRecordRaw> = [
    {
        path: "/",
        name: "Home",
        component: Home,
        meta: { title: 'Chart' },
        children: [
            {
                path: "/chart",
                name: "Chart",
                component: () => import(/* webpackChunkName: "about" */ "../views/Chart.vue"),
                meta: { title: 'Chart' },
            },{
                path: "/table",
                name: "Table",
                component: () => import(/* webpackChunkName: "about" */ "../views/Table.vue"),
                meta: { title: 'Chart' },
            },{
                path: "/form1",
                name: "Form1",
                component: () => import(/* webpackChunkName: "about" */ "../components/Form/Form1"),
                meta: { title: 'Chart' },
            },{
                path: "/form2",
                name: "Form2",
                component: () => import(/* webpackChunkName: "about" */ "../components/Form/Form2"),
                meta: { title: '系统首页' }
            },{
                path: "/form3",
                name: "Form3",
                component: () => import(/* webpackChunkName: "about" */ "../components/Form/Form3"),
                meta: { title: 'Chart' },
            },{
                path: "/form4",
                name: "Form4",
                component: () => import(/* webpackChunkName: "about" */ "../components/Form/Form4"),
                meta: { title: 'Chart' },
            },
        ]
    },
];

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router;
